const mongoose = require('mongoose')

mongoose.connect('mongodb://myhost:qingfengOS@8.140.241.221:27017/myhost?authSource=myhost')

let con = mongoose.connection

con.on('open',()=>{
    console.log('数据库连接成功');     
})  

con.on('error',(err)=>{
    console.log('数据库连接失败',err);
})

module.exports = mongoose
   
